﻿using ApiService.EF.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ApiService.EF.Mapper
{
    public class RoleEntityMapper : IEntityTypeConfiguration<RoleEntity>
    {
        public void Configure(EntityTypeBuilder<RoleEntity> builder)
        {
            builder.ToTable("t_base_role");

            builder.HasKey(p => p.Id).HasName("id");
            builder.Property(p => p.Name).HasColumnName("name").IsRequired();
        }
    }
}
